//If the time is less than 10, you will get "Good morning"
var d=new Date() var time=d.[...]() if (time<10) {document.write("Good morning")}